Integrand size = 32, antiderivative size = 321 \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=-\frac {(4 c h (b f g-2 c d h)-(4 c g-b h) (2 c f g-2 c e h+b f h)+2 c h (2 c f g-2 c e h+b f h) x) \sqrt {a+b x+c x^2}}{8 c^2 h^3}+\frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h}+\frac {\left (4 c h (2 c g-b h) (b f g-2 c d h)-(2 c f g-2 c e h+b f h) \left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right )\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{16 c^{5/2} h^4}+\frac {\sqrt {c g^2-b g h+a h^2} \left (f g^2-e g h+d h^2\right ) \text {arctanh}\left (\frac {b g-2 a h+(2 c g-b h) x}{2 \sqrt {c g^2-b g h+a h^2} \sqrt {a+b x+c x^2}}\right )}{h^4} \]
[Out]
Time = 0.45 (sec) , antiderivative size = 321, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {1667, 828, 857, 635, 212, 738} \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (4 c h (2 c g-b h) (b f g-2 c d h)-\left (-4 c h (b g-a h)-b^2 h^2+8 c^2 g^2\right ) (b f h-2 c e h+2 c f g)\right )}{16 c^{5/2} h^4}+\frac {\sqrt {a h^2-b g h+c g^2} \left (d h^2-e g h+f g^2\right ) \text {arctanh}\left (\frac {-2 a h+x (2 c g-b h)+b g}{2 \sqrt {a+b x+c x^2} \sqrt {a h^2-b g h+c g^2}}\right )}{h^4}-\frac {\sqrt {a+b x+c x^2} (4 c h (b f g-2 c d h)+2 c h x (b f h-2 c e h+2 c f g)-(4 c g-b h) (b f h-2 c e h+2 c f g))}{8 c^2 h^3}+\frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h} \]
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 828
Rule 857
Rule 1667
Rubi steps \begin{align*} \text {integral}& = \frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h}+\frac {\int \frac {\left (-\frac {3}{2} h (b f g-2 c d h)-\frac {3}{2} h (2 c f g-2 c e h+b f h) x\right ) \sqrt {a+b x+c x^2}}{g+h x} \, dx}{3 c h^2} \\ & = -\frac {(4 c h (b f g-2 c d h)-(4 c g-b h) (2 c f g-2 c e h+b f h)+2 c h (2 c f g-2 c e h+b f h) x) \sqrt {a+b x+c x^2}}{8 c^2 h^3}+\frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h}-\frac {\int \frac {-\frac {3}{4} h \left (4 c h (b g-2 a h) (b f g-2 c d h)-g \left (4 b c g-b^2 h-4 a c h\right ) (2 c f g-2 c e h+b f h)\right )-\frac {3}{4} h \left (4 c h (2 c g-b h) (b f g-2 c d h)-2 (2 c f g-2 c e h+b f h) \left (4 c^2 g^2-\frac {b^2 h^2}{2}-2 c h (b g-a h)\right )\right ) x}{(g+h x) \sqrt {a+b x+c x^2}} \, dx}{12 c^2 h^4} \\ & = -\frac {(4 c h (b f g-2 c d h)-(4 c g-b h) (2 c f g-2 c e h+b f h)+2 c h (2 c f g-2 c e h+b f h) x) \sqrt {a+b x+c x^2}}{8 c^2 h^3}+\frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h}+\frac {\left (\left (c g^2-b g h+a h^2\right ) \left (f g^2-h (e g-d h)\right )\right ) \int \frac {1}{(g+h x) \sqrt {a+b x+c x^2}} \, dx}{h^4}+\frac {\left (4 c h (2 c g-b h) (b f g-2 c d h)-(2 c f g-2 c e h+b f h) \left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right )\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{16 c^2 h^4} \\ & = -\frac {(4 c h (b f g-2 c d h)-(4 c g-b h) (2 c f g-2 c e h+b f h)+2 c h (2 c f g-2 c e h+b f h) x) \sqrt {a+b x+c x^2}}{8 c^2 h^3}+\frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h}-\frac {\left (2 \left (c g^2-b g h+a h^2\right ) \left (f g^2-h (e g-d h)\right )\right ) \text {Subst}\left (\int \frac {1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac {-b g+2 a h-(2 c g-b h) x}{\sqrt {a+b x+c x^2}}\right )}{h^4}+\frac {\left (4 c h (2 c g-b h) (b f g-2 c d h)-(2 c f g-2 c e h+b f h) \left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right )\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{8 c^2 h^4} \\ & = -\frac {(4 c h (b f g-2 c d h)-(4 c g-b h) (2 c f g-2 c e h+b f h)+2 c h (2 c f g-2 c e h+b f h) x) \sqrt {a+b x+c x^2}}{8 c^2 h^3}+\frac {f \left (a+b x+c x^2\right )^{3/2}}{3 c h}+\frac {\left (4 c h (2 c g-b h) (b f g-2 c d h)-(2 c f g-2 c e h+b f h) \left (8 c^2 g^2-b^2 h^2-4 c h (b g-a h)\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{16 c^{5/2} h^4}+\frac {\sqrt {c g^2-b g h+a h^2} \left (f g^2-h (e g-d h)\right ) \tanh ^{-1}\left (\frac {b g-2 a h+(2 c g-b h) x}{2 \sqrt {c g^2-b g h+a h^2} \sqrt {a+b x+c x^2}}\right )}{h^4} \\ \end{align*}
Time = 2.21 (sec) , antiderivative size = 324, normalized size of antiderivative = 1.01 \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\frac {\frac {h \sqrt {a+x (b+c x)} \left (-3 b^2 f h^2+2 c h (4 a f h+b (-3 f g+3 e h+f h x))+4 c^2 \left (3 h (-2 e g+2 d h+e h x)+f \left (6 g^2-3 g h x+2 h^2 x^2\right )\right )\right )}{c^2}+48 \sqrt {-c g^2+h (b g-a h)} \left (f g^2+h (-e g+d h)\right ) \arctan \left (\frac {\sqrt {-c g^2+h (b g-a h)} x}{\sqrt {a} (g+h x)-g \sqrt {a+x (b+c x)}}\right )-\frac {3 \left (-b^3 f h^3+2 b c h^2 (-b f g+b e h+2 a f h)+16 c^3 \left (f g^3+g h (-e g+d h)\right )-8 c^2 h \left (b f g^2+b h (-e g+d h)+a h (-f g+e h)\right )\right ) \text {arctanh}\left (\frac {\sqrt {c} x}{-\sqrt {a}+\sqrt {a+x (b+c x)}}\right )}{c^{5/2}}}{24 h^4} \]
[In]
[Out]
Time = 0.81 (sec) , antiderivative size = 515, normalized size of antiderivative = 1.60
method | result | size |
risch | \(\frac {\left (8 f \,h^{2} c^{2} x^{2}+2 b c f \,h^{2} x +12 c^{2} e \,h^{2} x -12 c^{2} f g h x +8 a c f \,h^{2}-3 b^{2} f \,h^{2}+6 b c e \,h^{2}-6 b c f g h +24 c^{2} d \,h^{2}-24 c^{2} e g h +24 c^{2} f \,g^{2}\right ) \sqrt {c \,x^{2}+b x +a}}{24 c^{2} h^{3}}-\frac {\frac {16 \left (a d \,h^{4}-a e g \,h^{3}+a f \,g^{2} h^{2}-b d g \,h^{3}+b e \,g^{2} h^{2}-b f \,g^{3} h +c d \,g^{2} h^{2}-g^{3} c e h +g^{4} c f \right ) c^{2} \ln \left (\frac {\frac {2 a \,h^{2}-2 b g h +2 c \,g^{2}}{h^{2}}+\frac {\left (b h -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+2 \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (b h -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{h^{2} \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}+\frac {\left (4 a b c f \,h^{3}-8 a \,c^{2} e \,h^{3}+8 a \,c^{2} f g \,h^{2}-b^{3} f \,h^{3}+2 b^{2} c e \,h^{3}-2 b^{2} c f g \,h^{2}-8 b \,c^{2} d \,h^{3}+8 b \,c^{2} e g \,h^{2}-8 b \,c^{2} f \,g^{2} h +16 c^{3} d g \,h^{2}-16 c^{3} e \,g^{2} h +16 c^{3} f \,g^{3}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{h \sqrt {c}}}{16 c^{2} h^{3}}\) | \(515\) |
default | \(\frac {e h \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )+f h \left (\frac {\left (c \,x^{2}+b x +a \right )^{\frac {3}{2}}}{3 c}-\frac {b \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{2 c}\right )-f g \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{h^{2}}+\frac {\left (d \,h^{2}-e g h +f \,g^{2}\right ) \left (\sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (b h -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}+\frac {\left (b h -2 c g \right ) \ln \left (\frac {\frac {b h -2 c g}{2 h}+c \left (x +\frac {g}{h}\right )}{\sqrt {c}}+\sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (b h -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\right )}{2 h \sqrt {c}}-\frac {\left (a \,h^{2}-b g h +c \,g^{2}\right ) \ln \left (\frac {\frac {2 a \,h^{2}-2 b g h +2 c \,g^{2}}{h^{2}}+\frac {\left (b h -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+2 \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}\, \sqrt {\left (x +\frac {g}{h}\right )^{2} c +\frac {\left (b h -2 c g \right ) \left (x +\frac {g}{h}\right )}{h}+\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}{x +\frac {g}{h}}\right )}{h^{2} \sqrt {\frac {a \,h^{2}-b g h +c \,g^{2}}{h^{2}}}}\right )}{h^{3}}\) | \(577\) |
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\int \frac {\sqrt {a + b x + c x^{2}} \left (d + e x + f x^{2}\right )}{g + h x}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {\sqrt {a+b x+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx=\int \frac {\sqrt {c\,x^2+b\,x+a}\,\left (f\,x^2+e\,x+d\right )}{g+h\,x} \,d x \]
[In]
[Out]